package com.jkc.xh.network.models;

/**
 * Created by wangjie28 on 2015/12/1.
 */
public class AssetInfoResponse {
    public String dta_money;
    public String enable_money;
    public String freeze_money;
    public String stock_enable_money;
    public String bean_money;
    public String market_value;
    public String profit_money;
    public String delay_money_sum;
    public int delay_money_diplay;
    public String delay_money_text;

    /**
     * 资金是否够抵扣延期费用
     *
     * @return
     */
    public boolean isEnoughMoney() {
        boolean isEnough = false;
        if (delay_money_diplay == 0) {
            isEnough = true;
        }
        return isEnough;
    }

    /**
     * 是否盈利
     *
     * @return true 盈利
     */
    public boolean isProfit() {
        boolean isProfit = false;
        try {
            Double nowMoney = Double.valueOf(profit_money);
            if (nowMoney >= 0) {
                isProfit = true;
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return isProfit;
    }

    /***
     *
     "dta_money" : "动态总资产",
     "enable_money" : "可用资金",
     "freeze_money" : "冻结资金",
     "stock_enable_money" : "实盘可用金额",
     "bean_money" : "抵用券",
     "market_value" : "当前股票市值",
     "profit_money" : "当前持仓盈亏",
     "delay_money_sum" : "延期所需总费用"
     "delay_money_diplay" : "延期总费用显示模式，0=正常，绿色打钩，1=警告，红色打叉",
     "delay_money_text" : "延期总费用下方的文字，如：此刻保证金充足，请注意盘中变化！"
     *
     */
}
